package com.zpf.service.impl;

import com.zpf.mapper.UserMapper;
import com.zpf.pojo.User;
import com.zpf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("service2")
//@Scope("prototype")多例
public class UserServiceImpl2 implements UserService {
    @Autowired
    private UserMapper userMapper;



    @Override
    public List<User> findAll() {
        System.out.println("======UserServiceImpl2是UserService接口的第二个实现类=========");
        List<User> list = userMapper.findUserAll();

        return list;
    }
}
